package com.ams.controller;

import com.ams.entity.Member;
import com.ams.mapper.MemberMapper;
import com.ams.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

/**
 * @author liuxiaoding
 * @data 2019/7/5
 */
@RestController
public class IndexController {

    @Autowired
    private CommonService commonService;

    @Autowired
    private MemberMapper memberMapper;

    @RequestMapping(value = "cp")
    public void cp(Integer mid, BigDecimal total){
        Member member=memberMapper.getMemberById(mid);
        commonService.js_cp(member,mid,total);

    }
}
